package com.ruibang.glass.produce.constant;

import java.time.format.DateTimeFormatter;

/**
 * 1 * @ClassName Constants
 * 2 * @Author: HuangLB
 * 3 * @date 2021/12/17 15:16
 * 4 * @Version 1.0
 */
public class Constants {

    public static final String ZERO_STR = "0";
    public static final String ONE_STR = "1";
    public static final String TWO_STR = "2";
    public static final String THREE_STR = "3";
    public static final String FOUR_STR = "4";
    public static final String FIVE_STR = "5";
    public static final String SIX_STR = "6";
    public static final String SEVEN_STR = "7";
    public static final String EIGHT_STR = "8";
    public static final String NINE_STR = "9";
    public static final String TEN_STR = "10";
    public static final String ELEVEN_STR = "11";
    public static final String TWELVE_STR = "12";
    public static final Integer ZERO_INT = 0;
    public static final Integer ONE_INT = 1;
    public static final Integer TWO_INT = 2;
    public static final Integer THREE_INT = 3;
    public static final Integer FOUR_INT = 4;
    public static final Integer FIVE_INT = 5;
    public static final Integer SIX_INT = 6;
    public static final Integer SEVEN_INT = 7;
    public static final Integer EIGHT_INT = 8;
    public static final Integer NINE_INT = 9;
    public static final Integer TEN_INT = 10;

    public static final String COLD_DATA_SOURCE_NAME = "cold_day_db";


    public static final String MEASURE_PINT_KEY = "ch_glass_thickness%sxz";

    public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    public static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss");

    public static final DateTimeFormatter GROUP_DATE_TIME = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:00");

    public static final String HOT_GLASS_ID_PREFIX = "SY";

    public static final String MONITOR_ID_REAL_TIME_CACHE_KEY = "monitor_id_real_time_cache_key";
    public static final String MONITOR_CODE_REAL_TIME_CACHE_KEY = "monitor_code_real_time_cache_key";
    public static final String DEVICE_MAPPING_MONITOR_CACHE = "%s_mapping_monitor_cache";
    public static final String TR_BZ_QUALITY_TYPE_KEY = "tr_bz_quality_type_%s";

    /**
     * 实时数据topic
     */
    public static final String DCS_CX_11_TOPIC = "1721910011-dcscx";//成型
    public static final String DCS_TD_11_TOPIC = "1721910011-dcstd";//通道
    public static final String DCS_XZ_11_TOPIC = "1721910011-dcsxz";//新增
    public static final String DCS_YL_11_TOPIC = "1721910011-dcsyl";//窑炉
    public static final String BC_COLD_BC2MES_10_TOPIC = "1721910010-cold1_bc2mes";//冷端
    public static final String BC_HOT2_BC2MES_TOPIC = "1721910013-hot2_bc2mes";//热端

    public static final String[] GLASS_FLUORESCENCE_TABLE_HEADERS = {"检测日期", "检测时间段", "检测玻璃区域", "SiO2(%)", "Al2O3(%)", "SrO(%)", "CaO(%)", "B2O3(%)", "SnO2(%)", "MgO(%)", "Fe2O3(%)", "K2O(%)", "Na2O(%)", "ZrO2(%)", "备注"};

    public static final String CONSUMER_GROUP = "RealTimeDataGroup";

    public Constants() {

    }

    public static enum SpecialSign {
        UNDERLINE("_"),
        POINT("."),
        BACKSLASH("\\"),
        RIGHTSLASH("/"),
        SINGLEQUOTES("'"),
        COLON(":"),
        COMMA(","),
        LEFTBRACKET("("),
        RIGHTBRACKET(")"),
        SPACE(" ");

        private String name;

        private SpecialSign(String name) {
            this.name = name;
        }

        public String getName() {
            return this.name;
        }
    }

}
